Checking Herbrand Equalities and Beyond
نویسندگان
چکیده
A Herbrand equality between expressions in a program is an equality which holds relative to the Herbrand interpretation of operators. We show that the problem of checking validity of positive Boolean combinations of Herbrand equalities at a given program point is decidable — even in presence of disequality guards. This result vastly extends the reach of classical methods for global value numbering which cannot deal with disjunctions and are always based on an abstraction of conditional branching with non-deterministic choice. In order to introduce our analysis technique in a simpler scenario we also give an alternative proof that in the classic setting, where all guards are ignored, conjunctions of Herbrand equalities can be checked in polynomial time. As an application of our method, we show how to derive all valid Herbrand constants in programs with disequality guards. Finally, we present a PSPACE lower bound and show that in presence of equality guards instead of disequality guards, it is undecidable to check whether a given Herbrand equality holds or not.
منابع مشابه
A Smooth Combination of Linear and Herbrand Equalities for Polynomial Time Must-Alias Analysis
We present a new domain for analyzing must-equalities between address expressions. The domain is a smooth combination of Herbrand and affine equalities which enables us to describe field accesses and array indexing. While the full combination of uninterpreted functions with affine arithmetics results in intractable assertion checking algorithms, our restricted domain allows us to construct an a...
متن کاملInterprocedural Herbrand Equalities
We present an aggressive interprocedural analysis for inferring value equalities which are independent of the concrete interpretation of the operator symbols. These equalities, called Herbrand equalities, are therefore an ideal basis for truly machine-independent optimizations as they hold on every machine. Besides a general correctness theorem, covering arbitrary call-by-value parameters and l...
متن کاملInter-procedural Two-Variable Herbrand Equalities
We prove that all valid Herbrand equalities can be interprocedurally inferred for programs where all assignments are taken into account whose right-hand sides depend on at most one variable. The analysis is based on procedure summaries representing the weakest preconditions for finitely many generic post-conditions with template variables. In order to arrive at effective representations for all...
متن کاملInterprocedural Polynomial Invariants Acknowledgement I Would like to Thank
This thesis describes techniques for static analysis of polynomial equalities in interprocedural programs. It elaborates on approaches for analysing polynomial equalities over different domains as well as techniques to apply polynomial analysis to infer interprocedurally valid equalities of uninterpreted terms. This work is organised in three major theoretical parts, followed by a practical par...
متن کاملTrue Equality Constraints over an Open Universe of Terms 1
For a rst-order language L, the Herbrand universe consists of ground terms of L. We deened 15, 16, 17] an !-Herbrand universe for L by introducing the following modiication: rst add to L countably many new individual constants, and then form the set of all ground terms of the resulting language. Newly added constants make this universe \open" and suitable for modeling those situations in databa...
متن کامل